package com.rd.student.jike.class4.xiayinyin.week04.day26;

import java.io.File;

public class exercises01 {
    public static void main(String[] args) {
        String objectPath = System.getProperty("user.dir");
        File f1 = new File(objectPath + "/" + "f1");
        File f2 = new File(objectPath + "/" + "f2");
        File t1 = new File(f1.getAbsolutePath() + "/" + "t1");
        File t2 = new File(f1.getAbsolutePath() + "/" + "t2");
        File t3 = new File(f2.getAbsolutePath() + "/" + "t3");
        File t4 = new File(f2.getAbsolutePath() + "/" + "t4");
        t3.renameTo(t4);
        t4.delete();
        String[] strList1 = f1.list();
        for (String s : strList1){
            System.out.println(s);
        }
        String[] strList2 = f2.list();
        for (String s : strList2){
            System.out.println(s);
        }
    }
}
